<template>
    <el-form :inline="true" :model="formInline" ref="formInlineRef" class="demo-form-inline">
        <el-form-item label="员工姓名"  prop="uname">
            <el-input v-model="formInline.uname"  autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="onSubmit('formInlineRef')">查询</el-button>
            <el-button @click="resetForm()">重置</el-button>
        </el-form-item>
    </el-form>
</template>

<script>
import {Search} from '@/api/hp/api'
export default {
    props: {
        
    },
    data() {
        return {
            SearchList:[],
            formInline: {
                uname: '',
            }
        }
    },
    methods: {
        onSubmit() {
            console.log(this.formInline);
            Search(this.formInline).then((res) => {
                console.log(res);
                this.SearchList = res.data
             
                this.$emit('childMsg',this.SearchList)
            })
            // this.$emit('childMsg',this.SearchList)
            
        },
        resetForm() {
            this.$refs.formInlineRef.resetFields();
            this.$emit('clear')
        }
    }
}
</script>

<style lang="scss" scoped>
.el-form{
    border-bottom: 3px #fff solid;
}

</style>